#include "Interpreter.h"
#include "BufferManager.h"
#include "RecordManager.h"
#include "CatalogManager.h"
#include "IndexManager.h"
#include "SysException.h"
#include "API.h"

#include <memory>
using namespace std;

int main(void)
{
	
	shared_ptr<BufferManager> buffer_manager = make_shared<BufferManager>();
	shared_ptr<IndexManager> index_manager = make_shared<IndexManager>(buffer_manager);
	shared_ptr<CCatalog> catalog_manager = make_shared < CCatalog >();
	shared_ptr<Record> record_manager = make_shared <Record>(buffer_manager);
	shared_ptr<API> api = make_shared <API>(index_manager, record_manager, catalog_manager);
	CInterpreter start(api, catalog_manager);

	start.StartMiniSQL();
	return 0;
}